import {get, outPost, post, put, remove} from "../http.js";
// 用户相关的接口
export function getAllRouter(page,limit){
    return get(`/router/getAllRouter/${page}/${limit}`)
}
export function getAllRouterAPI(){
    return get(`/router/getAllRouter`)
}
export function addRouter(form){
    return put("/router/addRouter",form)
}
export function editRouter(form){
    return post("/router/editRouter",form)
}
export function removeRouter(routerNo){
    return remove(`/router/removeRouter/${routerNo}`)
}
export function batchRemoveRouter(id){
    return remove("/router/batchRemoveRouter/"+id)
}
export function searchRouter(search){
    return post("/router/searchRouter",search)
}
export function batchAddRouter(routers){
    return post("/router/batchAddRouter",routers)
}
export function batchOutRouter(routers){
    return outPost("/router/batchOutRouter",routers)
}
export function verifyToken(token){
    return get(`/router/verify/${token}`)
}
export function getRoleRouter(role){
    return get(`/router/getRoleRouter/${role}`)
}
export function  addRoleRouter(role,router){
    return post("/router/saveRoleRouter",{"role":role,"routerArray":router})
}
export function showRouter(){
    return get("/router/showRouter")
}